<div class="bg-light lter b-b wrapper-md">
    <h1 class="m-n font-thin h3">财务管理</h1>
</div>

<div class="wrapper-md">
    <div class="panel panel-default">
        <div class="panel-heading">
            财务还款管理
        </div>
        <toaster-container toaster-options="{'position-class': 'toast-center', 'close-button':true}"></toaster-container>
        <div class="panel-body b-b b-light">
            <div class="form-group pull-in clearfix">
                <div class="col-sm-2">
                    <label><font><font>产品名称:</font></font></label>
                    <input type="text" class="form-control ng-pristine ng-untouched ng-invalid ng-invalid-required" name="" ng-model="returndata.ProductName"
                        required="">
                </div>
                <div class="col-sm-2">
                    <label><font><font>产品编号:</font></font></label>
                    <input type="text" class="form-control ng-pristine ng-untouched ng-invalid ng-invalid-required" name="" ng-model="returndata.ProductCode"
                        required="">
                </div>
                <div class="col-sm-2">
                    <label><font><font>产品组:</font></font></label>
                    <select class="form-control ng-pristine ng-untouched ng-invalid ng-invalid-required" ng-model="returndata.ProductGroup" name="">
                        <option value="0">全部</option>
	    				<option value="18">一月定期产品</option>
	    				<option value="20">三月定期产品</option>
	    				<option value="19">六月定期产品</option>
	    				<option value="1">新手标</option>
	    			</select>
                </div>
                <div class="col-sm-2">
                    <label><font><font>借款人ID:</font></font></label>
                    <input type="text" class="form-control ng-pristine ng-untouched ng-invalid ng-invalid-required" name="" ng-model="returndata.LoanUserId"
                        required="">
                </div>
            </div>
            <div class="form-group pull-in clearfix" ng-controller="DatepickerDemoCtrl" >
                <div class="col-sm-2">
                    <label><font><font>上架日期:</font></font></label>
                    <p class="input-group">
                        <span class="input-group-btn">
                        <button type="button" class="btn btn-default" ng-click="open2($event)"><i class="glyphicon glyphicon-calendar"></i></button>
                    </span>
                        <input type="text" class="form-control" datepicker-popup="{{format}}" ng-click="open2($event)" ng-model="returndata.FirstOnlineTime"
                            is-open="opened2" max-date="maxDate" datepicker-options="dateOptions" ng-required="true" close-text="Close"
                        />
                    </p>
                </div>
                <div class="col-sm-2">
                    <label><font><font>满标开始日期:</font></font></label>
                    <p class="input-group">
                        <span class="input-group-btn">
                        <button type="button" class="btn btn-default" ng-click="open($event)"><i class="glyphicon glyphicon-calendar"></i></button>
                    </span>
                        <input type="text" class="form-control" datepicker-popup="{{format}}" ng-click="open($event)" ng-model="returndata.FullStartTime"
                            is-open="opened" max-date="maxDate" datepicker-options="dateOptions" ng-required="true" close-text="Close"
                        />
                    </p>
                </div>
                <div class="col-sm-2">
                    <label><font><font>满标结束日期:</font></font></label>
                    <p class="input-group">
                        <span class="input-group-btn">
			    					<button type="button" class="btn btn-default" ng-click="open1($event)"><i class="glyphicon glyphicon-calendar"></i></button>
			    				</span>
                        <input type="text" class="form-control" datepicker-popup="{{format}}" ng-click="open1($event)" ng-model="returndata.FullEndTime"
                            is-open="opened1" max-date="maxDate" datepicker-options="dateOptions" ng-required="true" close-text="Close"
                        />
                    </p>
                </div>
                <div class="col-sm-2">
                    <button class="btn btn-info btn-addon" style="margin-top:25px" ng-if='!graybtn' ng-click="search()">查询</button>
                    <button class="btn btn-light btn-addon" style="margin-top:25px" ng-if='graybtn'>查询</button>
                </div>
                <div class="col-sm-4" style="margin-top:25px;">
                    <a href="{{gourl}}" target="_blank" ng-click="export()"class="btn btn-info btn-addon pull-right">导出</a>
                </div>
            </div>
        </div>
        <div class="panel-body b-b b-light">
            <div class="col-sm-4"><span>本金利息合计&nbsp;:&nbsp;</span><span ng-bind="RepaymentTotal.TotalRepayPrice"></span>&nbsp;元</div>
            <div class="col-sm-4"><span>投资本金总额&nbsp;:&nbsp;</span><span ng-bind="RepaymentTotal.TotalRepayPrincipal"></span>&nbsp;元</div>
            <div class="col-sm-4"><span>利息总额&nbsp;:&nbsp;</span><span ng-bind="RepaymentTotal.TotalRepayInterest"></span>&nbsp;元</div>
        </div>
        <div class="panel-body b-b b-light">
            <div class="col-sm-4"><span>已还本金&nbsp;:&nbsp;</span><span ng-bind="RepaymentTotal.RepayPrincipal"></span>&nbsp;元</div>
            <div class="col-sm-4"><span>已还利息&nbsp;:&nbsp;</span><span ng-bind="RepaymentTotal.RepayInterest"></span>&nbsp;元</div>
            <div class="col-sm-4"><span>在保本金&nbsp;:&nbsp;</span><span ng-bind="RepaymentTotal.HoldRepayPrincipal"></span>&nbsp;元</div>
        </div>
        <div class="panel-body b-b b-light">
            <div class="col-sm-4"><span>在保利息&nbsp;:&nbsp;</span><span ng-bind="RepaymentTotal.HoldRepayInterest"></span>&nbsp;元</div>
            <div class="col-sm-4"><span>手动加息券利息&nbsp;:&nbsp;</span><span ng-bind="RepaymentTotal.TotalRepayPlusInterest"></span>&nbsp;元</div>
        </div>
        <div class="table-responsive">
            <table id="tab" class="table table-striped m-b-none">
                <thead>
                    <tr>
                        <th style="min-width:100px">产品序号</th>
                        <th style="min-width:100px">产品编号</th>
                        <th style="min-width:100px">产品名称</th>
                        <th style="min-width:100px">还款方式</th>
                        <th style="min-width:100px">借款人姓名</th>
                        <th style="min-width:100px">产品组</th>
                        <th style="min-width:100px">加息利率</th>
                        <th style="min-width:100px">本金利息合计</th>
                        <th style="min-width:100px">利息总额</th>
                        <th style="min-width:100px">手动加息券利息</th>
                        <th style="min-width:100px">发标金额</th>
                        <th style="min-width:100px">投资本金</th>
                        <th style="min-width:100px">已还本金</th>
                        <th style="min-width:100px">已还总利息</th>
                        <th style="min-width:100px">年化利率</th>
                        <th style="min-width:100px">基准利率</th>
                        <th style="min-width:100px">产品状态</th>
                        <th style="min-width:100px">创建时间</th>
                        <th style="min-width:100px">首次上架时间</th>
                        <th style="min-width:100px">投标到期时间</th>
                        <th style="min-width:100px">满标时间</th>
                        <th style="min-width:100px">操作</th>
                    </tr>
                </thead>
                <tbody>
                    <tr ng-if="GetRepaymentList==''">
                        <td colspan="9">当前无任何数据</td>
                    </tr>
                    <tr ng-repeat="obj in GetRepaymentList">
                        <td ng-bind="$index+1"></td>
                        <td ng-bind="obj.ProductCode"></td>
                        <td ng-bind="obj.ProductName"></td>
                        <td ng-bind="obj.RepaymentTypeName"></td>
                        <td ng-bind="obj.LoanUserName"></td>
                        <td ng-bind="obj.ProductGroupName"></td>
                        <td ng-bind="obj.ShowRate"></td>
                        <td ng-bind="obj.TotalRepayPrice"></td>
                        <td ng-bind="obj.TotalRepayInterest"></td>
                        <td ng-bind="obj.TotalRepayPlusInterest"></td>
                        <td ng-bind="obj.LoanPrice"></td>
                        <td ng-bind="obj.TotalRepayPrincipal"></td>
                        <td ng-bind="obj.RepayPrincipal"></td>
                        <td ng-bind="obj.RepayInterest"></td>
                        <td ng-bind="obj.AnnualRateOfYear"></td>
                        <td ng-bind="obj.BasicRate"></td>
                        <td ng-bind="obj.ProductStatusName"></td>
                        <td ng-bind="obj.CreateTime|date:'yyyy-MM-dd HH:mm:ss'"></td>
                        <td ng-bind="obj.FirstOnlineTime|date:'yyyy-MM-dd HH:mm:ss'"></td>
                        <td ng-bind="obj.ExpireTime|date:'yyyy-MM-dd HH:mm:ss'"></td>
                        <td ng-bind="obj.FullTime|date:'yyyy-MM-dd HH:mm:ss'"></td>
                        <td><button class="btn m-b-xs btn-sm btn-info" ng-click="repaymentinfo(obj.Id)" ng-if="obj.ProductStatusName=='还款中'||obj.ProductStatusName=='已还清'">还款明细</button></td>
                    </tr>
                </tbody>
            </table>
        </div>

    </div>
    <div class="btn-group pull-right">
        <button type="button" class="btn btn-default" ng-click="prev()"><font><font>上一页</font></font></button>
        <button type="button" class="btn btn-default btnNum">{{index}}</button>
        <button type="button" class="btn btn-default" ng-click="next()"><font><font>下一页</font></font></button>
        <span class="btn btn-default">共<span ng-bind="GetRepaymentListTotal+'条数据'"></span></span>
    </div>
</div>